package com.start.pay.core.entity;

import com.alibaba.fastjson2.JSONArray;
import com.alibaba.fastjson2.JSONObject;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.start.common.entity.StartBaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.time.LocalDateTime;

@Data
@TableName("start_pay_order")
public class StartPayOrderEntity extends StartBaseEntity {


    @Schema(name = "订单号")
    private String orderNo;
    /**
     * 支付状态: 0未支付 1支付中 2已支付 3支付失败 99支付异常 -1 订单撤销 -2退款中 -3已退款 4退款失败  -99退款异常
     */
    @Schema(name = "支付状态: 0未支付 1支付中 2已支付 3支付失败 99支付异常 -1 订单撤销 -2退款中 -3已退款 -4退款失败   -99退款异常 -999订单关闭")
    private Integer payState;

    @Schema(name = "交易方式")
    private String tradeType;


    /**
     * 平台appId
     */
    @Schema(name = "平台appId")
    private String appId;
    /**
     * 平台类型
     */
    @Schema(name = "平台类型")
    private String platformType;


    /**
     * 用户类型
     */
    @Schema(name = "用户类型")
    private String userType;
    /**
     * 用户类型
     */
    @Schema(name = "用户类型")
    private String startUserType;


    /**
     * 用户id
     */
    @Schema(name = "用户id")
    private String userId;

    @Schema(name = "用户开放id")
    private String userOpenId;


    /**
     * 数量
     */
    @Schema(name = "数量")
    private Integer quantity;


    /**
     * 单价
     */
    @Schema(name = "单价")
    private Integer price;


    /**
     * 金额（分）
     */
    @Schema(name = "应收金额（分）")
    private Integer totalFee;

    @Schema(name = "优惠金额(分)")
    private Integer couponFee;
    @Schema(name = "应收金额（分）")
    private Integer receivableFee;

    /**
     * 描述信息
     */
    @Schema(name = "描述信息")
    private String notes;


    /**
     * 商品id
     */
    @Schema(name = "商品id")
    private String goodsId;


    /**
     * 业务名称
     */
    @Schema(name = "商品名称")
    private String goodsName;


    /**
     * 业务类型
     */
    @Schema(name = "业务类型")
    private String businessType;


    /**
     * 业务备注
     */
    @Schema(name = "业务备注")
    private String businessRemarks;
    /**
     * 业务备注
     */
    @Schema(name = "第三方平台订单号")
    private String thirdPlatformOrderNo;

    @Schema(name = "客户端IP地址")
    private String clientIp;

    @TableLogic
    @Schema(name = "删除标记", description = "0 正常 -1 删除")
    private Integer deleteFlag;
    @Schema(name = "标签", description = "多个使用英文逗号隔开")
    private String tags;
    @Schema(name = "扩展参数")
    private JSONObject prop;
    @Schema(name = "优惠卷id")
    private JSONArray couponIds;
    @Schema(name = "优惠类型", description = "输入文字")
    private String couponType;
    @Schema(name = "优惠备注")
    private String couponNotes;

    @Schema(name = "订单失效时间")
    private LocalDateTime expireTime;


}
